<!DOCTYPE html>
<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
<%@include file="headScript.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/ga/acm11022script.js"></script>  
</head>
<body>
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					
		<li class="info">
			<div class="clearfix">
				<div><strong>ยินดีต้อนรับ</strong></div>
				<div><i class="fa fa-user"></i> Admin </div>
				<div class="mt-10"><strong>คุณเข้าระบบครั้งล่าสุดเมื่อ</strong></div>
				<div class="mb-10"><i class="fa fa-clock-o"></i> 13 / 01 / 2558 14:00:00</div>
			</div>
		</li>
		<li class="active"><a href="javascript:void(0)" ><i class="fa fa-briefcase"></i> Agent Management <span class="arrow"></span></a>
			<ul class="sub-menu">
				<li class="active"><a href="javascript:void(0)" ><i class="fa fa-folder"></i> GA : General Agent <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM1101.jsp"><i class="fa fa-coffee"></i> AG </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM11021.jsp" class="active"><i class="fa fa-coffee"></i> AL </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM1103.jsp"><i class="fa fa-coffee"></i> AVP </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM1104.jsp"><i class="fa fa-coffee"></i> VP </a></li>
					</ul>
				</li>
				<li><a href="javascript:void(0)" ><i class="fa fa-folder"></i> SFC <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM1201.jsp"><i class="fa fa-coffee"></i> AG : Financing Allowance </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM1202.jsp"><i class="fa fa-coffee"></i> AG : Recruiting Award </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM1203.jsp"><i class="fa fa-coffee"></i> MM : Incentive </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM1204.jsp"><i class="fa fa-coffee"></i> O/E : Operation Expense </a></li>
					</ul>
				</li>
				<li><a href="javascript:void(0)" ><i class="fa fa-folder"></i> Summary <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM1301.jsp"><i class="fa fa-coffee"></i> GA - AG </a></li>
					</ul>
				</li>
			</ul>
		</li>
		<li><a href="javascript:void(0)"><i class="fa fa-briefcase"></i> Data Management <span class="arrow"></span></a>
			<ul class="sub-menu">
				<li><a href="javascript:void(0)"><i class="fa fa-folder"></i> SFC <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM2101.jsp"><i class="fa fa-coffee"></i> SFC Agent Structure </a></li>
					</ul>
				</li>
				<li><a href="javascript:void(0)"><i class="fa fa-folder"></i> Modify Data <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM2201.jsp"><i class="fa fa-coffee"></i> SFC Agent Structure </a></li>
					</ul>
				</li>
			</ul>
		</li>
		<li><a href="javascript:void(0)" ><i class="fa fa-briefcase"></i> Formula Management <span class="arrow"></span></a>
			<ul class="sub-menu">
				<li><a href="javascript:void(0)" ><i class="fa fa-folder"></i> SFC <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM3101.jsp"><i class="fa fa-coffee"></i> Recruiting Award Management </a></li>
					</ul>
				</li>
				<li><a href="javascript:void(0)" ><i class="fa fa-folder"></i> Adjustment <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM5101.jsp"><i class="fa fa-coffee"></i> Adjustment </a></li>
					</ul>
				</li>
			</ul>
		</li>
		<li><a href="javascript:void(0)" ><i class="fa fa-briefcase"></i> Report Management <span class="arrow"></span></a>
			<ul class="sub-menu">
				<li><a href="javascript:void(0)" ><i class="fa fa-folder"></i> Demo Report <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM4101.jsp"><i class="fa fa-coffee"></i> Report 1 </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM4102.jsp"><i class="fa fa-coffee"></i> Report 2 </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM4103.jsp"><i class="fa fa-coffee"></i> Report 3 </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM4104.jsp"><i class="fa fa-coffee"></i> Report 4 </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM4105.jsp"><i class="fa fa-coffee"></i> Report 5 </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM4106.jsp"><i class="fa fa-coffee"></i> Report 6 </a></li>
					</ul>
				</li>
			</ul>
		</li>
		<li><a href="javascript:void(0)" ><i class="fa fa-briefcase"></i> Financial Management <span class="arrow"></span></a>
			<ul class="sub-menu">
				<li><a href="javascript:void(0)" ><i class="fa fa-folder"></i> Finance <span class="arrow"></span></a>
					<ul class="sub-menu">
						<li><a href="${pageContext.request.contextPath}/content/ACM5102.jsp"><i class="fa fa-coffee"></i> Adjustment </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM5201.jsp"><i class="fa fa-coffee"></i> Tax Calculation </a></li>
						<li><a href="${pageContext.request.contextPath}/content/ACM5202.jsp"><i class="fa fa-coffee"></i> Tax Reduction </a></li>
					</ul>
				</li>
			</ul>
		</li>
		<li><a href="javascript:void()"><i class="fa fa-sign-out"></i> ออกจากระบบ </a></li>
				</ul>
			</div>
			
			<!-- End Side Menu -->

			<div class="col-sm-12 col-xs-12" id="right-side" style="min-height: 1429px;">
				<div id="navigator-bar">
					<i class="fa fa-home"></i> หน้าหลัก <i class="fa fa-angle-right ml-5 mr-5"></i> AL 
				</div>
				<!--End navigator-bar-->			

				<!-- Start detail-area -->				
				<div class="form-list clearfix" style="margin-top:-30px; margin-bottom:-75px;">
					<div class="search-box no-radius">
						<!-- header -->
						<div class="form-group clearfix search-header no-radius">
							<div class="pull-left">โชว์การคำการคำนวณ</div>
							<div class="pull-right"><div id="hide-button"><i class="fa fa-chevron-circle-up"></i></div></div>
						</div>
					  	<!-- BOX-BODY -->
					  	<div id="box-body">
				<div class="form-group clearfix mt-30">
						<div class="col-sm-12 mt-5" >
									<div class="col-sm-1"></div>
										<label id="#" class="col-sm-2 " style=" width: 110px;">เดือน/ปี</label>
										<div class="col-sm-2">
											<input type="text" id="inputPeNo" name="inputPeNo" class="form-control"  value="${yymm}" disabled="disabled">
										
										</div>
						</div>
						<div class="col-sm-12 mt-5" >
									<div class="col-sm-1"></div>
										<label id="#" class="col-sm-2 " style=" width: 110px;">รหัส AL</label>
										<div class="col-sm-2">
											<input type="text" id="inputAl" name="inputAl" class="form-control"  value="${peno}" disabled="disabled">
										
										</div>
						</div>
						<div class="form-group ">
							<div class="col-sm-12 mt-5" >
								<div class="col-sm-1"></div>
										<label id="#" class="col-sm-2 " style=" width: 110px;">ชื่อ - สกุล</label>
										<div class="col-sm-4">
											<input type="text" id="inputPeNo" name="inputPeNo" class="form-control"  value="${name}" disabled="disabled">
										</div>
							</div>
						</div>
						</div>
						
							<fieldset class="inner" style="padding-top:0px;">
							<legend>1</legend>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right">Active AG  +  Active AL </label>
									<div class="col-sm-3">
										<%-- <input type="text" id="" name="" class="form-control" 
										disabled="disabled" value="${vaOldActive}"> --%>
										<div class="input-group">
													<input type="text" class="form-control " value="${vaOldActive}" disabled="disabled" > <span
														class="input-group-btn"> <button  class="btn btn-primary " id="showAG"  >
														  <span class="glyphicon glyphicon-search" style="padding-bottom: 1px;padding-top: 1px;" ></span></button>
														</span>
														
										</div>
									</div>
									<label class="col-sm-2">person(s)</label>
								</div>
							</div>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right">Extra OV </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" value="${extraOv}" >
									</div>
									<label class="col-sm-2">%</label>
								</div>
							</div>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> OV </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" value="${ov}">
									</div>
									<label class="col-sm-2">%</label>
								</div>
							</div>
							</fieldset>
							
							<fieldset class="inner" style="padding-top:0px;">
							<legend>2</legend>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12 ml-10">
									<label class="col-sm-12 text-center">MOV  = &nbsp&nbsp&nbsp&nbsp  SUM(FYP - C + 2<sup>(nd)</sup> &nbsp RYP-C)  x OV </label>
								</div>
							</div>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> MOV = </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" placeholder="โชว์  total PC"  value="${pcAl}">
									</div>
									<label class="col-sm-1">x</label>
									<div class="col-sm-1">
										<input type="text" id="" name="" class="form-control" disabled="disabled" value="${ov}" >
									</div>
									<label class="col-sm-1">%</label>
								</div>
							</div>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> MOV =  </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled"  value="${bonusNet}">
									</div>
								</div>
							</div>
							</fieldset>
							
							
							<fieldset class="inner" style="padding-top:0px;">
							<legend>3</legend>
							<div class="row form-group form-horizontal">
								<h3 class="col-sm-12 text-center"> In case Policy is Free Look /Cancelled /Void</h3>
							</div>
							<div class="row form-group form-horizontal">
								<div id="table-negative"></div>
							</div>
							<%-- <div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> Remaining MOV = </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" placeholder=""  value="${bonusNet}">
									</div>
									<label class="col-sm-1">-</label>
									<div class="col-sm-2">
										<input type="text" id="" name="" class="form-control" disabled="disabled"  value="${difBonusNetBonusFl}" >
									</div>
								</div>
							</div>
							
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> Remaining MOV = </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" placeholder=""  value="${totalBonus}"  >
									</div>
								</div>
							</div> --%>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> MOV  </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" placeholder=""  value="${bonusNet}"  >
									</div>
								</div>
							</div>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> Diff Re-cal  </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" placeholder=""  value="${difBonusNetBonusFl}"  >
									</div>
									<label class="col-sm-3 text-right"style=" width: 200px;"> Active AG + Active AL  </label>
									<div class="col-sm-1">
										<input type="text" id="" name="" class="form-control" disabled="disabled" placeholder=""  value="${vaNewActive}"  >
									</div>
								</div>
							</div>
							<div class="row form-group form-horizontal">
								<div class="col-xs-12">
									<label class="col-sm-5 text-right"> Net MOV  </label>
									<div class="col-sm-3">
										<input type="text" id="" name="" class="form-control" disabled="disabled" placeholder=""  value="${totalBonus}"  >
									</div>
								</div>
							</div>
							</fieldset>
							
							
							<input type="hidden" id='peno' value="${peno} ">
							<input type="hidden" id='yymm' value="${YyMm} ">
		
				  			<!-- ### Modal Popup ### -->
					<div class="modal fade" id="detailsModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
				    <div class="modal-dialog" style="width:800px">
				        <div class="modal-content">
				            <div class="modal-header">
				            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				            <h3 class="modal-title" >ตาราง  Active AG  +  Active AL </h3>
				            </div>
				            <div class="modal-body">
				            	<div id="showdetailsAG">
				            	</div>
				            </div>
				            <div class="modal-footer">
				               <button type="submit" class="btn btn-primary" data-dismiss="modal"><i class="fa fa-times"></i> ปิดรายละเอียด </button>
							</div>
				    	</div>
				  	</div>
				</div>
				<!-- End pop up details -->
				
							<!-- footer -->
							<div class="form-group mt-20 clearfix search-footer no-radius">
								<div class="col-sm-12 text-center">
						 			<button type="button" class="btn btn-primary" onclick="history.back();"><i class="fa fa-calculator"></i> กลับ </button>
								</div>
					  		</div>					  
					 	<!-- END BOX-BODY -->
					</div>
				</div>

				<div class="form-list clearfix" style="margin-top:-30px; margin-bottom:-75px;">
					<div id="resultDetail">
						
					</div>
				</div>

			
			
			<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2558 โดยบริษัท เอสแคป โซลูชั่นส์ จำกัด</div>
		</div>
	</div>
</div>
</body>
</html>